package com.qys.livesMall.shortVideo.model.vo.app;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * @author yxh
 */
@Data
@Schema(name = "CommentVideoVO", description = "被评论的视频")
public class CommentVideoVO {

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "用户id")
    private Long userId;

    @Schema(description = "用户名")
    private String nickName;

    @Schema(description = "用户头像")
    private String avatar;

    @Schema(description = "评论时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+0")
    private LocalDateTime commentTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "视频id")
    private Long videoId;

    @Schema(description = "视频封面")
    private String videoImage;

    @Schema(description = "视频地址")
    private String videoUrl;

    @Schema(description = "播放量")
    private Integer watch;

    @JsonSerialize(using = ToStringSerializer.class)
    @Schema(description = "评论id")
    private Long commentId;

    @Schema(description = "评论内容")
    private String content;

    @Schema(description = "点赞数量")
    private Integer like;

    @Schema(description = "子评论")
    private List<CommentVideoVO> childComment;

    @Schema(description = "是否已点赞（0否，1是）")
    private Integer alreadyLiked;

}
